
<f:view xmlns="http://www.w3.org/1999/xhtml"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:p="http://primefaces.org/ui"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:pm="http://primefaces.org/mobile"
        contentType="text/html" renderKitId="PRIMEFACES_MOBILE">
    <pm:page title="Mobile Home" mini="true">
        <!-- Page content goes here -->
        <pm:view id="main">
            <pm:header title="Fixed Header" swatch="b" fixed="true"/>
            <pm:content>
                
               
  

    <h:form>  
  
       
            <p:outputLabel value="Username:" />  
            <p:inputText value="#{loginBean.username}"   
                    id="username" required="true"  />  
              
            <p:outputLabel for="password" value="Password:" />  
            <p:password value="#{loginBean.password}"   
                    id="password" required="true" label="password" />  
              
            
                <p:commandButton id="loginButton" value="Login" update=""   
                    actionListener="#{loginBean.login}"   
                    oncomplete="handleLoginRequest(xhr, status, args)"/>  
           
          
    </h:form>  
  
  
<script type="text/javascript">  
    function handleLoginRequest(xhr, status, args) {  
        if(args.validationFailed || !args.loggedIn) {  
            jQuery('#dialog').effect("shake", { times:3 }, 100);  
        } else {  
            dlg.hide();  
            jQuery('#loginLink').fadeOut();  
        }  
    }  
</script>
                
            </pm:content>

          <pm:footer fixed="true" style="text-align: center; font-size: 10px">
              
            </pm:footer>

        </pm:view>
    </pm:page>
</f:view>
